import request from '@/utils/request'

// 查询指标管理列表
export function listManage(query) {
  return request({
    url: '/indicators/manage/list',
    method: 'get',
    params: query
  })
}

// 查询指标管理详细
export function getManage(indicatorsId) {
  return request({
    url: '/indicators/manage/' + indicatorsId,
    method: 'get'
  })
}

// 新增指标管理
export function addManage(data) {
  return request({
    url: '/indicators/manage',
    method: 'post',
    data: data
  })
}

// 修改指标管理
export function updateManage(data) {
  return request({
    url: '/indicators/manage',
    method: 'put',
    data: data
  })
}

// 删除指标管理
export function delManage(indicatorsId) {
  return request({
    url: '/indicators/manage/' + indicatorsId,
    method: 'delete'
  })
}

// 获得全部指标管理
export function allManage(query) {
  return request({
    url: '/indicators/manage/all',
    method: 'get',
    params: query
  })
}

// 批量修改父节点
export function faManage(indicatorsId, father) {
  return request({
    url: '/indicators/manage/' + indicatorsId,
    method: 'put',
    data: {
    //  "indicatorsId" :indicatorsId,
      "father" :father,
    }
  })
}

// 新增指标管理(树)
export function addNode(father) {
  return request({
    url: '/indicators/manage/add/'+father,
    method: 'get',
    data: {
      //  "indicatorsId" :indicatorsId,
      "father" :father,
    }
  })
}
